﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="Countries.aspx.cs" Inherits="CarbonExchange_Countries" %>

<asp:Content ID="Content1" ContentPlaceHolderID="phHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="phMain" Runat="Server">
    <telerik:RadGrid ID="gridCountries" DataSourceID="dsCountries" runat="server" 
        AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
        AllowAutomaticUpdates="True" AllowPaging="True" AutoGenerateColumns="False" 
        AutoGenerateDeleteColumn="False" AutoGenerateEditColumn="False" GridLines="None" 
        Skin="Telerik">
        <HeaderContextMenu EnableTheming="True">
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
        </HeaderContextMenu>

        <MasterTableView DataSourceID="dsCountries" InsertItemDisplay="Bottom" 
                    CommandItemDisplay="Bottom" AllowSorting="True" DataKeyNames="Id">
            <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
    </RowIndicatorColumn>

    <ExpandCollapseColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
    </ExpandCollapseColumn>
        <Columns>
            <acms:RadIndexColumn />
            <telerik:GridTemplateColumn HeaderText="Name">
                <ItemTemplate>
                    <%#Eval("Name") %>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:DropDownList ID="ddlLocale" DataSourceID="dsLocale" DataValueField="Value" DataTextField="Name" SelectedValue='<%#Bind("Locale") %>' AppendDataBoundItems="true" runat="server">
                        <asp:ListItem Value="" Text="" />
                        <asp:ListItem Value="en-GB" Text="ENG" />
                    </asp:DropDownList>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridTemplateColumn HeaderText="Conversion">
                <ItemTemplate>
                    
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:RequiredFieldValidator ID="valConversionReq" ErrorMessage="!" CssClass="error" Display="Dynamic" ControlToValidate="txtConversion" runat="server" />
                    <asp:CompareValidator ID="valConversionFormat" ErrorMessage="Invalid Number" CssClass="error" Display="Dynamic" ControlToValidate="txtConversion" Operator="GreaterThan" ValueToCompare="0" Type="Double" runat="server" />
                    <asp:TextBox ID="txtConversion" runat="server" />
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="Created" DataType="System.DateTime" 
                HeaderText="Created" ReadOnly="True" SortExpression="Created" 
                UniqueName="Created">
            </telerik:GridBoundColumn>
            <acms:RadGridEditColumn />
            <acms:RadGridDeleteColumn />
        </Columns>
        <PagerStyle Mode="Slider" />
    </MasterTableView>
    <FilterMenu EnableTheming="True">
    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </FilterMenu>
    </telerik:RadGrid>
    <acms:EventDrivenDataSource id="dsCountries" runat="server" />
    <acms:EventDrivenDataSource id="dsLocale" runat="server" />

</asp:Content>

